#ifndef __MAGIC_API_H
#define __MAGIC_API_H
///公共
typedef void (*audio_callback_t)(u8 *ptr, u32 samples, int ch_mode, void *params);

typedef struct {
    cbuf_cfg_t magic_cbuf;
    u8 mute;
    u8 sample_rate;
    u16 samples;
    audio_callback_t callback;
} magic_cfg_t;
///magic
void magic_audio_mute_set(uint8_t mute);// 0：打开算法  1：关闭算法
///magic_param: -32767  ~ +32767
///默认值magic_mic_param_set(0)
void magic_audio_param_set(s32 magic_param);
void magic_audio_init(u8 sample_rate, u16 samples);
void magic_audio_input(u8 *ptr, u32 samples, int ch_mode, void *params);
void magic_audio_output_callback_set(audio_callback_t callback);
u8 magic_audio_mute_get(void);
void magic_mic_proc_cb(void);
#endif
